#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void find_var(int n)
{
	int var = 0;
	int i = 1;
	int j = 0;
	int k = 0;
	while (n / i)
	{
	
		j = n / (10 * i);
		k = n % (10 * i);
		var = var + j *k;
		i *= 10;
	}
	if (n == var)
	{
		printf("%d ", n);
	}
	

}


int main()
{
	int n = 0;
	for ( n = 100; n <100000; n++)
	{
		 find_var(n);
	}
	
	return 0;
}